import React from "react";

const Emoji = (props) => {
    
    const handleClick = () => {
        // 调用API，往编辑器中插入一个数字
        props.editor.insertText(
            ":smile:\n\n" +
            "<p>表情代码例如: \"smile\", \"whale\", \"santa\", \"panda_face\", \"dog\", \"truck\" ...</p>\n" +
            "<p>完整表情列表请参考 <a href=\"http://www.emoji-cheat-sheet.com/\" target=\"_blank\">Emoji 表情清单</a>。</p>\n"
        );
    }

    return (
        <span
        className="button button-type-counter"
        title="表情"
        onClick={handleClick}
        >
        <i className="fa fa-smile-o" />
        </span>
    );
}

Emoji.align = 'left';
Emoji.pluginName = 'emoji';

export default Emoji;